Check the number is prime or notΒΆ

Write a python function that takes a number as a parameter
and check the number is prime or not.
Note :
A prime number (or a prime) is a natural number greater
than 1 and that has no positive divisors other than 1 and itself.
def test_prime(N):
    if (N == 1):
        return False
    elif (N == 2):
        return True;
    else:
        for x in range(2, N):
            if N % x == 0:
                return False
        return True

# test
print(test_prime(9))        # False